package Qimo;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
import java.util.Set;

public class ShangPinText {
    static Scanner sc=new Scanner(System.in);
    public static void main(String[] args) {
        ArrayList<HashMap<String,Object>> list=new ArrayList<>();
        for (int i = 0; i < 5; i++) {
            System.out.println("请输入第"+(i+1)+"个商品：");
            HashMap<String,Object> map=new HashMap<>();
            System.out.println("请输入编号 名字 价格：");
            map.put("编号：",sc.next());
            map.put("名字：",sc.next());
            map.put("价格：",sc.next());

            list.add(map);
        }
        for (HashMap<String, Object> map : list) {
            System.out.println("商品信息如下：");
            Set<String> set = map.keySet();
            for (String s1 : set) {
                Object o=map.get(s1);
                System.out.println(s1+o);
            }
        }
    }
}
